package com.kaifamiao.handle;

public class HandleTest5 {

	public static void main(String[] args) {
		int x = test1();
		System.out.println( x );
		
		int y = test2();
		System.out.println( y );
		
		int z = test3();
		System.out.println( z );
	}
	
	@SuppressWarnings("finally")
	public static int test1() {
		try {
			return 1 ;
		} catch ( Exception e ) {
			return 2 ;
		} finally {
			return 3 ;
		}
	}
	
	public static int test2() {
		int x = 10 ;
		try {
			return x ;
		} catch ( Exception e ) {
			return x ;
		} finally {
			x++ ;
		}
	}
	
	@SuppressWarnings("finally")
	public static int test3() {
		int x = 10 ;
		try {
			x-- ;
		} catch ( Exception e ) {
			x++ ;
		} finally {
			return x;
		}
	}

}
